package com.baor.controller;

import com.baor.feign.DistributionFeign;
import com.baor.utils.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/fince")
public class FinceController {

    @Autowired
    private DistributionFeign feign;

    @RequestMapping("/test")
    public AjaxResult<?> test(@RequestBody Map<String, Object> map) {
        return feign.yueList(map);
    }

    @RequestMapping("/test2/{id}")
    public AjaxResult<?> test2(@PathVariable Integer id) {
        return feign.disMoney(id);
    }
}
